Platform Explorer / Nuxeo Platform 5.8

Contribution org.nuxeo.ecm.social.workspace.operation.chains--chains

This contribution is part of XML component org.nuxeo.ecm.social.workspace.operation.chains inside nuxeo-social-workspace-core-5.8.jar

Extension Point

Extension point chains of component OperationServiceComponent.

Contributed Items

  • <chain id="SocialWorkspaceCreatedChain">
          <operation id="Context.FetchDocument"/>
          <operation id="Context.SetVar">
            <param name="name" type="string">admins</param>
            <param name="value" type="object">administrators</param>
          </operation>
          <operation id="Workflow.CreateTask">
            <param name="task name" type="string">validateSocialWorkspace</param>
            <param name="directive" type="string">VERIFICATION</param>
            <param name="comment" type="string">Please validate social workspace</param>
            <param name="variable name for actors prefixed ids" type="string">admins</param>
            <param name="create one task per actor" type="boolean">true</param>
          </operation>
          <operation id="Notification.SendMail">
            <param name="rollbackOnError" type="boolean">false</param>
            <param name="from" type="string">expr:Env["mail.from"]</param>
            <param name="message" type="string">&lt;html&gt;
    Hello,
    
    Social Workspace &lt;a href="${docUrl}"&gt;${Document.title}&lt;/a&gt; was created. Please validate it &lt;a href="${baseUrl}nxadmin/${Session.repositoryName}${Document.path}@view_admin?tabIds=MAIN_TABS%3Aadmin%2CNUXEO_ADMIN%3ASocialWorkspacesAdministration"&gt;here&lt;/a&gt;.
    &lt;/html&gt;</param>
            <param name="subject" type="string">Social Workspace  created</param>
            <param name="HTML" type="string">true</param>
            <param name="to" type="stringlist">expr:Fn.getEmailsFromGroup("administrators")</param>
          </operation>
        </chain>
  • <chain id="SocialWorkspaceNotValidatedChain">
          <operation id="Context.FetchDocument"/>
          <operation id="Document.SetLifeCycle">
            <param name="value" type="string">delete</param>
          </operation>
          <operation id="Notification.SendMail">
            <param name="rollbackOnError" type="boolean">false</param>
            <param name="from" type="string">expr:Env["mail.from"]</param>
            <param name="message" type="string">Social Workspace "${Document.title}" was not validated by adminitrators and it will be suspended.</param>
            <param name="subject" type="string">expr:Social Workspace not validated: @{Document.title}</param>
            <param name="to" type="stringlist">expr:Fn.getEmail(Document["dc:creator"])</param>
          </operation>
        </chain>

XML Source

<extension point="chains" target="org.nuxeo.ecm.core.operation.OperationServiceComponent">
    <chain id="SocialWorkspaceCreatedChain">
      <operation id="Context.FetchDocument"/>
      <operation id="Context.SetVar">
        <param name="name" type="string">admins</param>
        <param name="value" type="object">administrators</param>
      </operation>
      <operation id="Workflow.CreateTask">
        <param name="task name" type="string">validateSocialWorkspace</param>
        <param name="directive" type="string">VERIFICATION</param>
        <param name="comment" type="string">Please validate social workspace</param>
        <param name="variable name for actors prefixed ids" type="string">admins</param>
        <param name="create one task per actor" type="boolean">true</param>
      </operation>
      <operation id="Notification.SendMail">
        <param name="rollbackOnError" type="boolean">false</param>
        <param name="from" type="string">expr:Env["mail.from"]</param>
        <param name="message" type="string">&lt;html&gt;
Hello,

Social Workspace &lt;a href="${docUrl}"&gt;${Document.title}&lt;/a&gt; was created. Please validate it &lt;a href="${baseUrl}nxadmin/${Session.repositoryName}${Document.path}@view_admin?tabIds=MAIN_TABS%3Aadmin%2CNUXEO_ADMIN%3ASocialWorkspacesAdministration"&gt;here&lt;/a&gt;.
&lt;/html&gt;</param>
        <param name="subject" type="string">Social Workspace  created</param>
        <param name="HTML" type="string">true</param>
        <param name="to" type="stringlist">expr:Fn.getEmailsFromGroup("administrators")</param>
      </operation>
    </chain>
    <chain id="SocialWorkspaceNotValidatedChain">
      <operation id="Context.FetchDocument"/>
      <operation id="Document.SetLifeCycle">
        <param name="value" type="string">delete</param>
      </operation>
      <operation id="Notification.SendMail">
        <param name="rollbackOnError" type="boolean">false</param>
        <param name="from" type="string">expr:Env["mail.from"]</param>
        <param name="message" type="string">Social Workspace "${Document.title}" was not validated by adminitrators and it will be suspended.</param>
        <param name="subject" type="string">expr:Social Workspace not validated: @{Document.title}</param>
        <param name="to" type="stringlist">expr:Fn.getEmail(Document["dc:creator"])</param>
      </operation>
    </chain>
  </extension>